-
Notifications
You must be signed in to change notification settings - Fork 416
Feat/doc editor skeleton #1491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/doc editor skeleton #1491
Conversation
9707dc5 to
f976a72
Compare
|
Size Change: +1.34 kB (+0.04%) Total Size: 3.68 MB
|
f976a72 to
5b99563
Compare
src/frontend/apps/impress/src/features/left-panel/components/DocCreationOverlay.tsx
Outdated
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/left-panel/components/DocCreationOverlay.tsx
Outdated
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/docs/doc-editor/components/DocEditorSkeleton.tsx
Outdated
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/docs/doc-editor/components/DocEditorSkeleton.tsx
Outdated
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/docs/doc-editor/components/DocEditorSkeleton.tsx
Outdated
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/docs/doc-editor/components/DocEditorSkeleton.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As talk together, maybe something very generic could be nice (BooleanStore ?), with Record<string, boolean>; to be able to have multiple toggles here and there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we talk together afterwards, ye created an useSkeletonStore as we just need it for this specific case for the moment
| overflow-x: clip; | ||
| `} | ||
| > | ||
| <DocCreationOverlay /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same I think it could be nice to have something more generic, that can be used for other things that DocCreation.
The problem that I find as well, is I get a bit the flickering effect, if we could implement a light transition before unmounting the skeleton would be great (fadeOut / fadeIn ?)
69846b2 to
09d8341
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a proposal to simplify a bit Skeleton.tsx, let me know if you find that suitable.
I think will should modify our commits, to talk about this new feature.
src/frontend/apps/impress/src/features/skeletons/components/DocEditorSkeleton.tsx
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/skeletons/store/useSkeletonStore.tsx
Outdated
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/left-panel/components/LeftPanelHeaderButton.tsx
Outdated
Show resolved
Hide resolved
| // If we're in creation mode, the global skeleton is already displayed | ||
| // Otherwise, display the local skeleton | ||
| if (!doc) { | ||
| return <Loading />; | ||
| return isLoading ? null : <DocEditorSkeleton />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not need to do that, if you want to have the skeleton displayed when the page load, you just have to activate the skeleton like that setLoading(true);, at the earliest moment so maybe in DocLayout ?
6c84664 to
caf41b3
Compare
546aeb5 to
9ce0640
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🚀
602c2b2 to
de88a86
Compare
creating a skeleton to be display during doc creation Signed-off-by: Cyril <[email protected]>
de88a86 to
8b73aa3
Compare
Purpose
Introduce a loading skeleton in the DocEditor and manage its visibility using Zustand. Ensure the loader is removed properly in case of errors to prevent it from staying stuck on screen.
issue : 1452
nothrotskeleton.mp4
Proposal